<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>北方食品_事件流</title>
<link rel="icon" href="../../images/food/shi_4.ico"  type="image/x-icon"> 
<link href="../style/base.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../js/jplugin/jquery.cookie.js"></script>
<style type="text/css">
	.wrapper{
		width:1000px;
		margin:0 auto;
	}
	.dragBox{
		position: absolute;
		width:300px;
		height:200px;
		background-color: #356fac;
	}
	.edit{
		color:#fff;
		float: right;
		margin-right: 10px;
		width:200px;
	}
</style>

<script type="text/javascript">
	var B = new function(){
		this.drag = function(){
			alert("mousedown");
		};
		this.edit = function(e){
			//alert("edit");
			
			$.cookie('loginName',$("#btn").html(),{
				expires:30,
				path:'/'
			});
			
			e.stopPropagation();
		};
	}();
</script>

<script type="text/javascript">
	$(function(){
		$(".dragBox").mousedown(B.drag);
		$(".edit").mousedown(B.edit);
		
		$("#btn").html($.cookie("loginName") + "s");
	});
</script>

</head>
<body>
	<div class="wrapper">
		<div class="dragBox">
			<a id="btn" class="edit" href="javascript:edit()">编辑</a>
		</div>
	</div>
</body>
</html>